import request from '@/utils/request'

// 编辑
export function createOrUpdateInfo(form) {
  return request.post('/projects/createOrUpdate', form)
}

// 获取
export function queryList(listquery) {
  return request.post('/projects/query', listquery)
}

export function changeStatus(id, status) {
  return request.post('/projects/changeStatus', { id, status })
}

export function getProjectById(id) {
  return request.post('/projects/get', { id })
}

export function queryProjectOrderList(listquery) {
  return request.post('/projects/queryOrder', listquery)
}

export function cancelOrder(id) {
  return request.post('/projects/cancelOrder', {id})
}



export function getStatus() {
  return {
    'create': '创建',
    'publish': '发布',
    'offline': '下架',
    'finish': '结束'
  }
}

export function getOrderStatus() {
  return {
    'create': '创建',
    'payed': '已支付',
    'finish': '到期完成',
    'cancel': '毁约'
  }
}

export function getClassType() {
  return {
    'tuoguan': '托管区',
    'fuli': '福利区',
    'tiyan': '体验区'
  }
}